<template>
  <el-dialog title="查看" :close-on-click-modal="false" :visible.sync="visible" width="70%">
    <el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="150px">

             <div>
                 <el-form-item label="平台">
                   <el-input maxlength="10" disabled show-word-limit v-if="dataForm.platform" v-model="dataForm.platform.platform_value" placeholder="必填,商品短标题"></el-input>
                 </el-form-item>
                 <el-form-item label="粉丝数量">
                   <el-input  v-if="dataForm.fanweight" v-model="dataForm.fanweight.fanweight_value" disabled ></el-input>
                 </el-form-item>
                 <el-form-item label="注册手机号码">
                   <el-input v-model="dataForm.platform_phone" disabled ></el-input>
                 </el-form-item>
                 <el-form-item label="内容方向">
                   <el-input v-if="dataForm.content_direction" v-model="dataForm.content_direction.content_direction_value" disabled ></el-input>
                 </el-form-item>
                 <el-form-item label="姓名">
                   <el-input v-model="dataForm.real_name" disabled ></el-input>
                 </el-form-item>
                 <el-form-item label="手机号码">
                   <el-input v-model="dataForm.mobile" disabled ></el-input>
                 </el-form-item>
                 <el-form-item label="身份证号码">
                   <el-input v-model="dataForm.card" disabled ></el-input>
                 </el-form-item>
                 <el-form-item label="身份证正面图片">
                      <img style="width: 100px; height: 100px;" :src="dataForm.card_back_path"></img>
                 </el-form-item>
                 <el-form-item label="身份证反面图片">
                      <img style="width: 100px; height: 100px;" :src="dataForm.card_front_path"></img>
                 </el-form-item>
               <el-form-item label="粉丝截图">
                      <img style="width: 100px; height: 100px;" :src="dataForm.fans_file_path"></img>
                 </el-form-item>
                 <el-form-item label="审核状态">
                   <div v-if="dataForm.state==1"  >
                     审核通过
                   </div>
                   <div v-if="dataForm.state==2">
                     审核不通过
                    </div>
                    <div v-if="dataForm.state==0">
                      待审核
                    </div>
                 </el-form-item>
                 <el-form-item label="审批理由" v-if="dataForm.reason!==null&&dataForm.reason!==''">
                   <div>
                     {{dataForm.reason}}
                   </div>
                 </el-form-item>
             </div>
             <!--拓展信息-->

    </el-form>
    <span slot="footer" class="dialog-footer">
      <el-button @click="close()">关闭</el-button>
    </span>
  </el-dialog>
</template>

<script>
  import {treeDataTranslate} from '@/utils'
  // import serviceApione from '@/api/serviceApione.js'
  import serviceApi from '@/api/serviceApi.js'

  export default {
    components: {
    },
    data () {
      return {
        visible: false,

        dataForm: {},
        sendModel: [],
        productClassifyTableData: [],
        productClassifyMultipleSelection: []
      }
    },

    methods: {
      init (id) {
        this.visible = true
        // this.$nextTick(() => {
        //   this.$refs['dataForm'].resetFields()
        // })
        this.dataForm.cover = []
        serviceApi.getCelebrityDetail(id).then(res => {
          if (res.data.code == 200) {
            this.dataForm = res.data.data
            console.log(this.dataForm)
          }
        })
          // 运费模板数据
          // serviceApione.freighttemplate().then(res=>{
          //   if(res.data.code==200){
          //     this.sendModel = res.data.list
          //   }
          // })
      },
      // 查询所有商品分类
      // getCategoryList(id){
      //   serviceApione.getCategory().then(res=>{
      //     if(res.data.code==200){
      //       this.productClassifyTableData = res.data.list
      //         res.data.list.forEach(k=>{
      //           if(k.id==id){
      //             this.productClassifyMultipleSelection =[k]
      //           }else{
      //             k.children.forEach(j=>{
      //               if(j.id==id){
      //                 this.productClassifyMultipleSelection =[j]
      //               }
      //             })
      //           }
      //         })
      //     }
      //   })
      // },
      close () {
        this.visible = false
      }
    }
  }
</script>

<style lang="scss">
img{
  margin-right: 10px;
  }
  .paImg{
    width: 148px;
    height: 148px;
  }
</style>
